//
//  ThirtyeigthViewController.m
//  Depressed.domo
//
//  Created by rimi on 16/5/27.
//  Copyright © 2016年 薛涛. All rights reserved.
//

#import "ThirtyeigthViewController.h"
#import "HCHeckLList.h"
@interface ThirtyeigthViewController ()<HCHeckLListDelegate>
{
    HCHeckLList *chk;
    HCHeckLList *chk1;
}
@end

@implementation ThirtyeigthViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor orangeColor];
    chk = [[HCHeckLList alloc]initWithFrame:CRM(50, 100, 200, 0)];
    [chk setArrDataList:@[@"111",@"222",@"333",@"444",@"555"]];
    [chk setDelegate:self];
    [chk setCurrentIndex:3];
    [self.view addSubview:chk];
    
    chk1 = [[HCHeckLList alloc] initWithFrame:CRM(50, 300, 200, 0)];
    [chk1 setArrDataList:@[@"AAA",@"BBB",@"CCC",@"DDD",@"EEE"]];
    [chk1 setDelegate:self];
    [chk1 setCurrentIndex:1];
    [self.view addSubview:chk1];
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [chk setArrDataList:@[@"12435"]];

}

#pragma mark delegate
- (void) checkListSelectAtIndex:(NSInteger)index text:(NSString *)text checkList:(HCHeckLList *)checkList{
    if (checkList == chk) {
        NSLog(@"index:%ld",index);
        NSLog(@"text:%@",text);
    }else if (checkList == chk1) {
        NSLog(@"index:%ld",index);
        NSLog(@"text:%@",text);
    }
}

@end
